# -*- coding:utf-8 -*-
__author__ = "daoyu"
__date__ = "2023-6-29"
__doc__ = "记录日志"

import os,sys
sys.path.append(os.getcwd())
from utils.yaml_client import YamlClient
from loguru import logger

# 记录日志
logger.add(r"log\tgu_apitest.log",
           level=YamlClient().load_yaml(r"conf\log_config.yaml")[0],
           encoding="utf-8",
           retention="1 week"
           )
if __name__ == "__main__":
    logger.debug("这是一段DEBUG日志")
    logger.info("这是一段INFO日志")
    logger.error("这是一段ERROR日志")